package icu.ikuns.notice.observe;

import icu.ikuns.notice.element.Department;
import icu.ikuns.notice.element.Employee;
import icu.ikuns.notice.element.MyElement;

/**
 * @Author： Kimariyb
 * @Date：2022/05/26/18:14
 * @Description：
 */
public class User extends MySubject{
    @Override
    public void regist() {
        MyElement emp1, emp2, emp3;
        Department department1;

        emp1 = new Employee();
        emp2 = new Employee();
        emp3 = new Employee();

        department1 = new Department();

        department1.add(emp1);
        department1.add(emp2);
        meetingList.add(emp3);
        meetingList.add(department1);

        for (Object obs : meetingList) {
            System.out.println("员工注册信息！");
            ((MyElement) obs).send();
        }
    }
}
